package com.bwie.pojo;

import com.baomidou.mybatisplus.annotation.TableField;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.lang.reflect.Member;

/**
 * 
 * @TableName tb_commodity
 */
@Data
public class TbCommodity {
    /**
     * 
     */

    private Integer commodityId;

    /**
     * 商品名称
     */
    @NotBlank(message = "商品名称不能为空")
    @Length(min = 8,max = 36,message = "商品名称8-36字")
    private String commodityName;

    /**
     * 商品编号
     */

    private String commodityCode;

    /**
     * 商品品牌
     */
    @NotNull(message = "品牌不能为空")
    private Integer commodityBrand;

    /**
     * 描述
     */
    @NotBlank(message = "介绍不能为空")
    @Length(min = 256,message = "商品介绍不能少于128字")
    private String commodityDesc;

    /**
     * 价格
     */
    @NotNull(message = "价格不能为空")
    private Double commidityPrice;

    /**
     * 标签
     */
    private String tag;

    /**
     * 运费险
     */
    @NotNull(message = "运费险不能为空")
    private Integer yfx;

    /**
     * 店家承担
     */
    @NotNull(message = "店家承担不能为空")
    private Integer djcd;

    @TableField(exist = false)
    private String brandName;
    @TableField(exist = false)
    private Integer buyNum;
}